package com.weixinli.beans;

import java.io.Serializable;

public class Test implements Serializable{
	private int tid;   //测试编号
	private String timg;//测试图片地址
	private String tname;//测试题目名字
	private String tdec;//测试描述
	private String ttype;//测试类型

	private static final long serialVersionUID = 1L;

	@Override
	public String toString() {
		return "Test [tid=" + tid + ", timg=" + timg + ", tname=" + tname
				+ ", tdec=" + tdec + ", ttype=" + ttype + "]";
	}

	public int getTid() {
		return tid;
	}

	public void setTid(int tid) {
		this.tid = tid;
	}

	public String getTimg() {
		return timg;
	}

	public void setTimg(String timg) {
		this.timg = timg;
	}

	public String getTname() {
		return tname;
	}

	public void setTname(String tname) {
		this.tname = tname;
	}

	public String getTdec() {
		return tdec;
	}

	public void setTdec(String tdec) {
		this.tdec = tdec;
	}

	public String getTtype() {
		return ttype;
	}

	public void setTtype(String ttype) {
		this.ttype = ttype;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((tdec == null) ? 0 : tdec.hashCode());
		result = prime * result + tid;
		result = prime * result + ((timg == null) ? 0 : timg.hashCode());
		result = prime * result + ((tname == null) ? 0 : tname.hashCode());
		result = prime * result + ((ttype == null) ? 0 : ttype.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Test other = (Test) obj;
		if (tdec == null) {
			if (other.tdec != null)
				return false;
		} else if (!tdec.equals(other.tdec))
			return false;
		if (tid != other.tid)
			return false;
		if (timg == null) {
			if (other.timg != null)
				return false;
		} else if (!timg.equals(other.timg))
			return false;
		if (tname == null) {
			if (other.tname != null)
				return false;
		} else if (!tname.equals(other.tname))
			return false;
		if (ttype == null) {
			if (other.ttype != null)
				return false;
		} else if (!ttype.equals(other.ttype))
			return false;
		return true;
	}

	public Test(int tid, String timg, String tname, String tdec, String ttype) {
		super();
		this.tid = tid;
		this.timg = timg;
		this.tname = tname;
		this.tdec = tdec;
		this.ttype = ttype;
	}

	public Test() {
		super();
	}
}
